

package com.springcloud.sc.upms.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author zhl
 * @since 2017-10-29
 */
@Data
@TableName("sys_user")
@EqualsAndHashCode(callSuper = true)
public class SysUser extends Model<SysUser> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键ID
	 */
	@TableId(value = "user_id", type = IdType.AUTO)
	private Integer userId;
	/**
	 * 用户名
	 */
	private String username;

	private String password;
	/**
	 * 随机盐
	 */
	@JsonIgnore
	private String salt;
	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private LocalDateTime createTime;
	/**
	 * 修改时间
	 */
	@TableField("update_time")
	private LocalDateTime updateTime;
	/**
	 * 0-正常，1-删除
	 */
	@TableLogic
	private String delFlag;

	/**
	 * 锁定标记
	 */
	private String lockFlag;

	/**
	 * 简介
	 */
	private String phone;
	/**
	 * 头像
	 */
	private String avatar;

	/**
	 * 部门ID
	 */
	@TableField("dept_id")
	private Integer deptId;

	/**
	 *
	 */
	@TableId(value = "tenant_id")
	private Integer tenantId;

	/**
	 * 微信openid
	 */
	@TableId(value = "wx_openid")
	private String wxOpenid;

	/**
	 * QQ openid
	 */
	@TableId(value = "qq_openid")
	private String qqOpenid;

	/**
	 * 码云唯一标识
	 */
	private String giteeLogin;

	/**
	 * 开源中国唯一标识
	 */
	private String oscId;

	/**
	 * UCP关联标识
	 */
	@TableId(value = "ucp_id")
	private String ucpId;

	@Override
	public String toString() {
		return "SysUser{" +
				"userId=" + userId +
				", username='" + username + '\'' +
				", password='" + password + '\'' +
				", salt='" + salt + '\'' +
				", createTime=" + createTime +
				", updateTime=" + updateTime +
				", delFlag='" + delFlag + '\'' +
				", lockFlag='" + lockFlag + '\'' +
				", phone='" + phone + '\'' +
				", avatar='" + avatar + '\'' +
				", deptId=" + deptId +
				", tenantId=" + tenantId +
				", wxOpenid='" + wxOpenid + '\'' +
				", qqOpenid='" + qqOpenid + '\'' +
				", giteeLogin='" + giteeLogin + '\'' +
				", oscId='" + oscId + '\'' +
				", ucpId='" + ucpId + '\'' +
				'}';
	}
}
